package com.liu.lab13.controller;


import com.liu.lab13.pojo.Music;
import com.liu.lab13.service.MusicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

import java.util.List;
@Controller
public class MusicController {
    @Autowired
    @Qualifier("musicService")
    private MusicService musicService;

    public void setMusicService(MusicService musicService) {
        this.musicService = musicService;
    }

    public List<Music> findAllMusic() {
        return musicService.getAllMusics();
    }
}
